package command

import (
	"bytes"
	"os/exec"
)

// 执行cmd命令
func ExecCommand(cmd string, args []string) error {
	var out bytes.Buffer
	execCmd := exec.Command(cmd, args...)
	execCmd.Stdout = &out
	return execCmd.Run()
}

// 执行docker命令
func ExecDockerCommand(args []string) error {
	cmd := "docker"
	return ExecCommand(cmd, args)
}
